#include "Dictionary.h"
#include "KeyRecommander.h"

void test(){
    Dictionary d1;
    d1.initDictEn("/home/lihaha/3SSYQ/eng_dict(2).txt");
    d1.initIndexEn("/home/lihaha/3SSYQ/eng_index(2).txt");

    d1.initDictCh("/home/lihaha/3SSYQ/chi_dict.txt");
    d1.initIndexCh("/home/lihaha/3SSYQ/chi_index.txt");
    string a;
    cout<<"please enter :";
    cin>>a;
    //d1.doAndQuery(a);
    // vector<pair<string,int>>& t1=d1.doAndQuery(a);
    // int i=0;
    // for(auto elem:t1){
    //     cout<<elem.first<<" "<<elem.second<<endl;
    //     i++;
    //     while(i==50){
    //         break;
    //     }
    // }
    
    //cout << "before keyTest(a, d1)" << endl;
    KeyRecommander keyTest(a, d1);
    //cout << "after keyTest(a, d1)" << endl;
    keyTest.statistic();
    //cout << "after statistic()" << endl;

    keyTest.print();


}
int main()
{
    test();
    return 0;
}

